// 父应用用哪个router,子应用也用哪个router
import { BrowserRouter as Router, Link } from 'react-router-dom'
import './App.css'
import React from 'react'
function App() {
  // let containerRef = React.createRef()
  // let microApp
  // useEffect(() => {
  //   microApp = loadMicroApp({
  //     name: 'm-vue2',
  //     entry: '//localhost:40000',
  //     container: containerRef.value
  //   })
  // })
  return (
    <div className="App">
      <Router>
        {/* 组件也可以做微应用 */}
        <Link to="/vue">Vue应用</Link>
        <Link to="/react">React应用</Link>
        <Link to="/vue2">Vue2应用</Link>
      </Router>
      {/* 切换导航,将微应用渲染到container容器中 */}
      <div id="container" ></div>
    </div>
  );
}

export default App;
